<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>药品材料(只读)</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/res/layui/css/layui.css" media="all">
    <script src="/res/js/util.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
<body>
<table class="layui-hide" id="test" lay-filter="test"></table>

<script src="/res/layui/layui.js" charset="utf-8"></script>
<script>
    var openIndex = null;
    var table = null;
    layui.use(['table', 'form'], function () {
        table = layui.table;
        form = layui.form;

        table.render({
            elem: '#test'
            , url: '/hqDrugmaterials/selectAll?drugId=' + getQueryString("id")
            , id: 'test'
            , title: '药品配置表'
            , cols: [[
                {field: 'drugName',title: '药品名称', width: 180, fixed: 'left', unresize: true, sort: true}
                , {field: 'materialName', title: '材料名称', width: 120}
                , {field: 'materialsNum', title: '材料重量', width: 90, edit: 'test'}
            ]]
        });

    });
</script>
</body>
</html>